< previous page page_76 next page >

Page 76
Besides the TextBox control, you need to add the menu as shown in Figure 3.5. To enable the initial functions, add the following code to the application:
Private Sub Form_Resize()
    txtinput.Height = ScaleHeight
    txtinput.Width = ScaleWidth
End Sub
Private Sub mnuFileExit_Click()
    End
End Sub
Private Sub mnuFileNew_Click()
    Dim NewNote As New frmSDINote
    NewNote.Show
End Sub
When you execute this application, this small amount of code will cause the text box to expand to cover the entire work area of the form, no matter what size you make the form. Although this application has only one form, you can have as many instances of it as you need (see Figure 3.6). Controlling the application's arrangement on the desktop is entirely up to users.
12181-0076a.gif
Figure 3.6.
Having multiple SDI application instances at the same time.
To this simple structure, you can now add any processing code that you need to perform the desired tasks. Some of the tasks you might perform in a Notepad-type application would be opening an existing or new file, saving a file, copying and pasting, and printing.

 
< previous page page_76 next page >

If you like this book, buy it!